package cn.itcast.feign.client;

import cn.itcast.feign.entity.TbUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86187
 * Date: 2023-09-12
 * Time: 0:57
 */

@FeignClient("userservice")  // 指定向哪一个服务发起请求
public interface UserClient {

    @GetMapping("/user/{id}")
    TbUser findById(@PathVariable("id") Long id, @RequestParam("token") String token);

}
